#include<iostream>
using namespace std;
void quick_sort(int arr[], int l, int r)
{
	if (l >= r) {
		return;
	}
	int x = arr[l];
	int i = l - 1;
	int j = r + 1;
	while (i < j) {
		do i++;
		while (arr[i] < x);
		do j--;
		while (arr[j] > x);
		if (i < j) {
			int temp = arr[i];
			arr[i] = arr[j];
			arr[j] = temp;
		}
	}
	quick_sort(arr, l, j);
	quick_sort(arr, j + 1, r);
}
void merge_sort(int arr[], int l, int r)
{
	if (l >= r) {
		return;
	}
	int mid = (l + r) / 2;
	merge_sort(arr, l, mid);
	merge_sort(arr, mid + 1, r);
	int i = l;
	int j = mid + 1;
	int temp[1001];
	int k = 0;
	while (i <= mid && j <= r)
	{
		if (arr[i] <= arr[j]) {
			temp[k++] = arr[i++];
		}
		else {
			temp[k++] = arr[j++];
		}
	}
	while (i <= mid) {
		temp[k++] = arr[i++];
	}
	while (j <= r) {
		temp[k++] = arr[j++];
	}
	for (int i = l, j = 0; i < r + 1; i++, j++)
	{
		arr[i] = temp[j];
	}
}
int main()
{
	int arr[1001];
	int n;
	cin >> n;
	for (int i = 0; i < n; i++) {
		cin >> arr[i];
	}
	//quick_sort(arr, 0, n-1);
	merge_sort(arr, 0, n - 1);
	for (int i = 0; i < n; i++)
	{
		cout << arr[i] << " ";
	}
	return 0;
}